#!/bin/bash
# Check if you can run a file
#
current_file_dir=$( dirname ${BASH_SOURCE[0]} )
item_name=${current_file_dir}/22-testing-a-file-is-writable
echo
echo "Checking if you can run $item_name..."
#
# Check if file is executable.
#
if [ -x $item_name ]
then
    echo "You can run $item_name."
    echo "Running $item_name..."
    $item_name
    #
else
    echo "Sorry, you cannot run $item_name."
    #
fi
